Store security groups in database

Description

Adds the ability to change the security groups for menu items in the Tabbed UI at runtime.

Discussion

When you build a TabbedUI component, you typically assign security groups to the various buttons shown on the TabbedUI menu. For example, suppose you have a button that opens a Grid called "Inventory". When you design your TabbedUI component, you may have set the visibility on this button to users who are members of the Operations group.

Suppose at runtime, a user who is an Administrator wants to change the security groups that can see the button to open the Inventory Grid. Perhaps the Administrator wants so add the Sales group to the button's security groups.

Historically, the application developer would need to edit the TabbedUI component, change the security groups for the button, and republish the application.

You can allow runtime changes to the security groups for each control in a TabbedUI by storing the control security groups in a database.

To turn this feature on, check the Store security groups in a database on the TabbedUI properties pane.

Once you have turned this feature on, several additional properties are exposed: Button help for edit button and Button text. Button help for edit button is help text shown when the user hovers the mouse over the edit button. Button text is the text shown in the edit button. By default, this is set to {icon}, meaning an icon is shown.

images/tuisecgroups1.gif

After enabling Store security groups in a database, you to add a button to your TabbedUI to toggle editing security groups. Set the label on this button to "Edit security groups". The JavaScript for this button should be:

tbiObj._toggleEditControlSecurityGroupsMode()

It is strongly recommended that you set the security groups for this button to the Administrators groups.

You will also need to go to the Project Properties dialog and configure the database table where the TabbedUI security settings are stored. See the Component Security Settings property in the image below. This will allow you to create a table with the correct schema to store the component security settings.

images/tuisecgroups2.gif

At runtime, if someone in the Administrators group clicks on the Edit security groups button, all of the buttons on the TabbedUI will be redrawn with an icon or button to the right of the button text. For example:

images/tabbeduibuttonwithsecuritychangebutton.gif

If the user clicks on the icon a window is opened where the security groups for this button can be changed:

images/tuisecgroups3.gif

See Also